#include "request.h"
#include "log.h"
#ifdef WIN32
unsigned long  _beginthread (void (__cdecl *) (void *),
        unsigned, void *);
void client_thread_win32(void *);
#endif

#ifdef LINUX
#include <pthread.h>
void *client_thread(void *);
#endif


void create_cli_thread(struct request *req)
{
#ifdef LINUX
	pthread_t tid;
	if ( pthread_create(&tid, 0, client_thread, (void *)req) )
		LOG_ERR("pthread_create error\n");
#elif (defined WIN32)
	_beginthread(client_thread_win32,0,(void *)req);
#else
#	error "platform not sepecified"
#endif
}